using Game.Networking.Client;
using MemoryPack;

namespace Game.Networking {
	public sealed class S_SyncTransformMessageHandler : BaseServerMessageHandler {

		public override ServerPacketID CommandId {
			get {
				return ServerPacketID.UpdateEntityPosRot;
			}
		}

		public override void ProcessMessage(byte[] rawCommand) {
			var command = MemoryPackSerializer.Deserialize<S_SyncTransformMessage>(rawCommand);
			ClientEntityController.Instance.UpdatePosition(command.ID,command.Position, command.Rotation, true, true);
		}
	}
}
